<?php $this->pageTitle=Yii::app()->name . ' - Registro'; ?>

<h1>registro de nuevo usuario</h1>

<?php if(Yii::app()->user->hasFlash('register')): ?>
<div class="confirmation">
<?php echo Yii::app()->user->getFlash('register'); ?>
</div>
<?php else: ?>

<div class="yiiForm">

<?php echo CHtml::beginForm(); ?>

<?php echo CHtml::errorSummary($register); ?>

<div class="simple">
<?php echo CHtml::activeLabel($register,'username'); ?>
<?php echo CHtml::activeTextField($register,'username'); ?>
</div>
<div class="simple">
<?php echo CHtml::activeLabel($register,'realname'); ?>
<?php echo CHtml::activeTextField($register,'realname'); ?>
</div>
<div class="simple">
<?php echo CHtml::activeLabel($register,'email'); ?>
<?php echo CHtml::activeTextField($register,'email'); ?>
</div>
<div class="simple">
<?php echo CHtml::activeLabel($register,'password'); ?>
<?php echo CHtml::activePasswordField($register,'password'); ?>
</div>
<div class="simple">
<?php echo CHtml::activeLabel($register,'password2'); ?>
<?php echo CHtml::activePasswordField($register,'password2'); ?>
</div>

<?php if(extension_loaded('gd')): ?>
<div class="simple">
	<?php echo CHtml::activeLabel($register,'verifyCode'); ?>
	<div>
	<?php $this->widget('CCaptcha'); ?>
	<?php echo CHtml::activeTextField($register,'verifyCode'); ?>
	</div>
</div>
<?php endif; ?>

<div class="action">
<?php echo CHtml::submitButton('enviar'); ?>
</div>

<?php echo CHtml::endForm(); ?>

</div><!-- yiiForm -->
<?php endif; ?>